package top.zsyle.system.mapper;

import org.apache.ibatis.annotations.Param;
import top.zsyle.system.domain.Permission;
import top.zsyle.basic.mapper.BaseMapper;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author zsy
 * @since 2022-11-29
 */
public interface PermissionMapper extends BaseMapper<Permission> {

    Permission loadBySn(String permissionSn);

    void addMiddle(@Param("roleId") Long id, @Param("permissions")List<Long> permissions);

    void deleteMiddleByRoleId(Long roleId);

    List<String> findAllByLogininfoId(Long logininfoId);
}
